import { defineUserConfig, DefaultThemeOptions } from "vuepress";
import recoTheme from "vuepress-theme-reco";
import nav from "./config/nav";

export default defineUserConfig({
  title: "永和的主页",
  description:
    "个人主页，前端博客，专注web前端学习与总结。JavaScript，js，ES6，TypeScript，vue，python，css3，html5，Node，git，github等技术文章。",
  base: "/",
  head: [
    [
      "link",
      {
        rel: "icon",
        href: "/favicon.ico",
      },
    ],
    [
      "meta",
      {
        name: "keywords",
        content:
          "前端博客,个人技术博客,前端,前端开发,前端框架,web前端,前端面试题,技术文档,学习,面试,JavaScript,js,ES6,TypeScript,vue,python,css3,html5,Node,git,github,markdown,vis-network,three.js,cesium,echarts",
      },
    ],
    [
      "meta",
      {
        name: "theme-color",
        content: "#11a8cd",
      },
    ],
  ],
  theme: recoTheme({
    style: "@vuepress-reco/style-default",
    logo: "/logo.jpg",
    author: "justinzyh",
    authorAvatar: "/img/avatar.png",
    docsRepo: "https://justinzyh.gitee.io/",
    docsBranch: "main",
    docsDir: "docs",
    lastUpdatedText: "最后更新时间",

    // 项目开始时间，只填写年份
    startYear: "2017",
    // series 为原 sidebar
    series: {
      "/docs/": [
        {
          text: "概述",
          children: ["basic"]
        },
        {
          text: "Cesium文档",
          children: ["home", "theme"],
        },
        {
          text: "Three文档",
          children: ["api", "plugin"],
        },
      ],
    },
    navbar: [{ text: "主页", link: "/" }, ...nav],
    bulletin: {
      body: [
        {
          type: "text",
          content: `🎉🎉🎉 前端Cesium，Three，Vue，Bootstrap，Layui，ElementUi，Ant-design，Uni-App，微信小程序，Jquery，Java，Mysql，Node，MongoDB等技术探索。`,
          style: "font-size: 12px;",
        },
        {
          type: "hr",
        },
        {
          type: "title",
          content: "QQ号",
        },
        {
          type: "text",
          content: `
          <ul>
            <li>QQ：1476156127</li>
          </ul>`,
          style: "font-size: 12px;",
        },
        {
          type: "hr",
        },
        {
          type: "title",
          content: "代码托管仓库",
        },
        {
          type: "text",
          content: `
          <ul>
            <li><a href="https://gitee.com/justinzyh">Gitee：justinzyh<a/></li>
            <li><a href="https://github.com/justinzyh">Github：justinzyh<a/></li>
          </ul>`,
          style: "font-size: 12px;",
        },
        {
          type: "hr",
        },
        {
          type: "buttongroup",
          children: [
            {
              text: "赞",
              link: "/docs/others/donate.html",
            },
          ],
        },
      ],
    },
    commentConfig: {
      type: "valine",
      // options 与 1.x 的 valineConfig 配置一致
      options: {
        // appId: 'xxx',
        // appKey: 'xxx',
        // placeholder: '填写邮箱可以收到回复提醒哦！',
        // verify: true, // 验证码服务
        // notify: true,
        // recordIP: true,
        // hideComments: true // 隐藏评论
      },
    },
  }),
  debug: true,
  port: 9527,
});
